package com.example.smart_community.mapper;

import com.example.smart_community.po.Houseinfo;
import com.example.smart_community.po.Pay;
import org.apache.ibatis.annotations.*;

@Mapper
public interface PayMapper {
    @Select("select * from pay where id=#{id}")
    @Results({
            @Result(property = "hId",column = "h_id"),
            @Result(property = "pyTime",column = "py_time"),
            @Result(
                    property ="houseinfo" ,column ="h_id",
                    javaType= Houseinfo.class,
                    one=@One(select ="com.example.smart_community.mapper.HouseinfoMapper.selectById")
            )
    })
    Pay selectById(Integer id);
}
